(function() {
  var __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  this.ShowProfileView = (function(_super) {

    __extends(ShowProfileView, _super);

    function ShowProfileView() {
      return ShowProfileView.__super__.constructor.apply(this, arguments);
    }

    ShowProfileView.prototype.el = $("#main");

    ShowProfileView.prototype.initialize = function() {
      ShowProfileView.__super__.initialize.apply(this, arguments);
      this.model.bind("change", this.render);
      return this.model.fetch();
    };

    ShowProfileView.prototype.render = function() {
      var _this = this;
      return this.GetTemplate(SiteMap.Account.ShowProfileTemplate, function(compiledTemplate) {
        return $(_this.el).html(compiledTemplate(_this.model.toJSON()));
      });
    };

    ShowProfileView.prototype.events = {
      "click li.show-profile-rated-books": "showProfileRatedBooks",
      "click button.add-to-friends": "addToFriends",
      "click button.send-message": "sendMessage",
      "click li.show-prifile-friends": "getFriends"
    };

    ShowProfileView.prototype.showProfileRatedBooks = function(e) {
      var url;
      e.preventDefault();
      url = SiteMap.Account.ShowProfileRatedBooks + "/" + this.model.get("Login");
      return this.Navigate(url, true);
    };

    ShowProfileView.prototype.addToFriends = function(e) {
      return e.preventDefault();
    };

    ShowProfileView.prototype.sendMessage = function(e) {
      var view;
      e.preventDefault();
      view = new SendMessageView();
      return view.render();
    };

    ShowProfileView.prototype.getFriends = function(e) {
      var url;
      e.preventDefault();
      url = SiteMap.Friends.FriendsListing + "/" + this.model.get("Login");
      return this.Navigate(url, true);
    };

    return ShowProfileView;

  })(CustomView);

}).call(this);
